<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <!-- 在<head>部分引入CSS -->
    <link href="./css.css" rel="stylesheet">
    <title>Title</title>
</head>
<body>
<div id="example"></div>
<script>
    let data = [],
        row = 20,
        col = 10;
    for (let i = 0; i < row; i++) {
        data.push([]);
        for (let j = 0; j < col; j++) {
            data[i].push("文本内容" + i + ',' + j);
        }
    }

    document.addEventListener('DOMContentLoaded', function() {

        var hot = new Handsontable(document.getElementById('example'), {
            data: data,
            colHeaders: false, // 显示列标题
            rowHeaders: false, // 显示行标题
            contextMenu: true, // 启用右键菜单
        });
    });
</script>

<script src="./handsontable.js"></script>
</body>
</html>